<template>
  <div class="login-page">
    <m-header title="登陆" :left-options="{showBack: true}"></m-header>
    <div class="form-wrapper">
      <div class="input-wrapper">
        <img class="left-img" src="../../assets/imgs/login/my@2x.png" alt="">
        <div class="divider"></div>
        <input placeholder="请输入账号/手机号"/>
      </div>
      <div class="input-wrapper">
        <img class="left-img" src="../../assets/imgs/login/lock@2x.png" alt="">
        <div class="divider"></div>
        <div class=""><input :type="showPasswd?'':'password'" placeholder="请输入密码"/></div>
        <img v-if="!showPasswd" class="hidden-passwd" @click="showPasswd=!showPasswd" src="../../assets/imgs/login/闭眼@2x.png" alt="">
        <img v-else class="show-passwd" @click="showPasswd=!showPasswd" src="../../assets/imgs/login/眼睛@2x.png" alt="">
      </div>
      <div class="login-btn">登陆</div>
      <div class="extra-wrapper">
        <a class="register">立即注册</a>
        <a class="forget-passwd">忘记密码？</a>
      </div>
      <div class="divider-label">
        <div class="title">第三方登陆</div>
      </div>
      <div class="third-part-login">
        <img class="weixin" src="../../assets/imgs/login/微信@2x.png" alt="">
        <img class="qq" src="../../assets/imgs/login/qq@2x.png" alt="">
      </div>
    </div>
  </div>
</template>
<script>
// import Attention from './Attention';
// import Fans from './Fans';

export default {
  components: {
    // Attention,
    // Fans
  },
  data () {
    return {
      tabIndex: 0,
      // currentView: [Attention, Fans],
      // tabList: ['关注', '粉丝']
      showPasswd: false
    }
  },
  created () {
    this.tabIndex = this.$route.query.type * 1 || 0;
  },
  methods: {
    handleTabClick (index) {
      this.tabIndex = index;
      this.$router.replace({name: 'Attention', query: { type: index }});
    }
  }
}
</script>
<style lang="less" scoped>
  @import '../../assets/styles/mixins.less';
  .login-page {
    .form-wrapper {
      position: relative;
      top: 3.2rem;
      .input-wrapper {
        margin: auto;
        margin-bottom: 0.3rem;
        border: 0.02rem solid #D2D2D2;
        width: 6.5rem;
        height: 1rem;
        border-radius: 0.5rem;
        display: flex;
        align-items:center;
        .left-img {
          width: 0.44rem;
          height: 0.44rem;
          margin-left: 0.52rem;
        }
        .divider {
          height: 0.5rem;
          margin-left: 0.2rem;
          margin-right: 0.3rem;
          border-left: 0.01rem solid #D2D2D2;
        }
        input {
          font-size: 0.28rem;
          width: 4rem;
          height: 0.8rem;
          margin-right: 0.2rem;
        }
        .hidden-passwd {
          width: 0.44rem;
          height: 0.21rem;
        }
        .show-passwd {
          width: 0.44rem;
          height: 0.37rem;
        }
      }
      .login-btn {
        margin: auto;
        margin-top: 0.3rem;
        margin-bottom: 0.25rem;
        width: 6.5rem;
        height: 1rem;
        line-height: 1rem;
        text-align: center;
        border-radius: 0.5rem;
        background-color: #D44743;
        color: #FFFFFF;
        font-size: 0.34rem;
      }
      .extra-wrapper {
        font-size: 0.26rem;
        position: relative;
        height: 0.4rem;
        margin-bottom: 2rem;
        .register {
          position: absolute;
          left: 0.9rem;
          color: #D44743
        }
        .forget-passwd {
          position: absolute;
          right: 0.9rem;
          color: #666666;
        }
      }
      .divider-label {
        .border-1px-bottom(#d2d2d2);
        .title {
          position: absolute;
          top: -0.13rem;
          width: 1.4rem;
          background-color: white;
          z-index: 1;
          margin-left: -0.7rem;
          left: 50%;
          font-size: 0.26rem;
          color: #999999;
        }
      }
      .third-part-login {
        padding-top: 0.54rem;
        position: relative;
        img {
          width: 0.8rem;
          height: 0.8rem;
          &.weixin {
            position: absolute;
            left: 2.15rem;
          }
          &.qq {
            position: absolute;
            right: 2.15rem;
          }
        }
      }
    }

  }

</style>
